package com.zh.risk.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.List;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description: 风控模型实体
 * @Author: Liard
 * @Create in: 2020/9/9 15:04
 * @Version: 1.0.1
 */
@Document
@Data
public class RiskModel implements Serializable{
    private static final long serialVersionUID = -4416288219688577859L;

    @ApiModelProperty(value = "对应抽象规则id", name = "id")
    @Id
    @Field("_id")
    private String id;
    @ApiModelProperty(value = "商户风控规则主键ID", name = "mrcId")
    @TableField(exist = false)
    private String mrcId;
    @ApiModelProperty(value = "模型名称", name = "name")
    private String name;
    @ApiModelProperty(value = "聚合规则字段", name = "agg")
    private String agg;
    @ApiModelProperty(value = "搜索字段", name = "seaField")
    private String[] seaField;
    @ApiModelProperty(value = "统计字段", name = "staField")
    private String[] staField;
    @ApiModelProperty(value = "附加条件", name = "param")
    private List<Item> param;
    @ApiModelProperty(value = "时间片", name = "num")
    private Integer num;
    @ApiModelProperty(value = "时间单位", name = "unit")
    private String unit;
    @ApiModelProperty(value = "筛选集合", name = "items")
    private List<Item> items;
    @ApiModelProperty(value = "规则分值", name = "score")
    private Integer score;
}
